package com.wongoing.util;

public enum RexUtil {
	ACCOUNT("^[a-zA-Z][a-zA-Z0-9_]{4,15}$","字母开头，5-16位，允许字母数字下划线"),
	PWD("(?!^[0-9]+$)(?!^[A-z]+$)(?!^[^A-z0-9]+$)^.{6,20}$","6-20位，至少包含数字、字母或特殊字符中的两种组合"),
	EMAIL("(^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$)","邮箱格式不正确"),
	MOBILE("^1(3|4|5|7|8)\\d{9}$","11位，以13/14/15/17/18开头");
	private String pattern;
	private String message;
	private RexUtil(String pattern, String message) {
		this.pattern = pattern;
		this.message = message;
	}
	public String getPattern() {
		return pattern;
	}
	public void setPattern(String pattern) {
		this.pattern = pattern;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public String toString() {
		return this.pattern;
	}
}
